<?php
namespace catchAdmin\newsDeclare\model;

use catchAdmin\basics\model\Official;
use catchAdmin\externalGoods\model\search\NewsSearch;
use catcher\base\CatchModel;
use think\Exception;
use think\facade\Db;

class NewsReview extends CatchModel
{

    protected $name = 'db_news_review';
    protected $field = [
        'id',
        'article_id',
        'article_type',
        'judge_id',
        'result',
        'created_at',
        'updated_at',
        'deleted_at',
        'tenant_id',
        'creator_id'
    ];

    public function getList($tenant_id = 0)
    {
        $where = [];
        if($tenant_id !== 0){
            $where[]=['tenant_id','=',$tenant_id];
        }

        return $this
            ->withoutField('updated_at,deleted_at')
            ->catchSearch()
            ->where($where)
//            ->order($this->aliasField('id'), 'desc')
            ->order('id','desc')
            ->paginate()
            ->each(function (&$item) {
            });
    }
}
